package joke.ibatis.dao;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import joke.ibatis.po.ComicPO;
import joke.ibatis.po.ParameterPo;

public class ComicImp extends SqlMapClientDaoSupport implements ComicDao {

	public ComicPO getComicPOOrder(ParameterPo parpo) {
		ComicPO po = (ComicPO) getSqlMapClientTemplate().queryForObject(
				"getComicPOOrder", parpo);
		return po;
	}

	public ComicPO getComicPoById(ComicPO parpo) {
		ComicPO po = (ComicPO) getSqlMapClientTemplate().queryForObject(
				"getComicPoById", parpo);
		return po;
	}

	public void updateComic(ComicPO po) {
		getSqlMapClientTemplate().update("updateComic", po);
	}

	public List getComics(ParameterPo po) {
		List contentList = getSqlMapClientTemplate().queryForList("getComics",
				po);
		return contentList;
	}

	public ComicPO getContentByRandom(String id) {
		ComicPO po = (ComicPO) getSqlMapClientTemplate().queryForObject(
				"getContentByRandom", id);
		return po;
	}

}
